<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
		    var txt = "窗前明月光，疑是地上霜";
		    alert(txt.length);
		    alert(txt.indexOf("光"));
		    alert(txt.substring(2,4));
		</script>
	</body>
</html>
